class Segments1 extends egret.Sprite {
    public constructor() {
        super()
        this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
    }

    private onAddToStage(event: egret.Event) {
        let segment0:Segment = new Segment(100, 20)
        this.addChild(segment0)
        segment0.x = 100
        segment0.y = 50

        let segment1:Segment = new Segment(200, 10)
        this.addChild(segment1)
        segment1.x = 100
        segment1.y = 80

        let segment2:Segment = new Segment(80, 40)
        this.addChild(segment2)
        segment2.x = 100
        segment2.y = 120
    }
}